package com.example.demo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.dto.RegisterDTO;
import com.example.demo.exception.UserAlreadyExistsException;
import com.example.demo.exception.ValidationException;
import com.example.demo.model.User;
import com.example.demo.model.UserBook;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.transaction.annotation.Transactional;

import javax.validation.Valid;

public interface AuthService {

    User registerUser(RegisterDTO registerDTO) throws UserAlreadyExistsException, ValidationException;


    UserDetails loadUserByUsername(String username) throws UsernameNotFoundException;

    UserDetails authenticateUser(String username, String password);


}
